package com.eudon.ai.agent.controller;

import com.eudon.ai.agent.app.LoveMaster;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;

/**
 * @author eudon
 * @description 恋爱大师controller层
 * @date 2025/8/8
 * @email syd19970616@gmail.com
 * @address <a href="https://gitee.com/eudon">Gitee</a>
 */
@RestController
@Slf4j
@RequestMapping("/love-master")
public class LoveMasterController {
    public final LoveMaster loveMaster;

    public LoveMasterController(LoveMaster loveMaster) {
        this.loveMaster = loveMaster;
    }

    @PostMapping("/ask")
    public String ask(@RequestBody String question) {
        String chatId = UUID.randomUUID().toString();
        return loveMaster.ask(question, chatId);
    }
}
